//
//  CXLDetailsLabel.m
//  WYNews
//
//  Created by 夜猫子 on 2017/3/18.
//  Copyright © 2017年 夜猫子. All rights reserved.
//

#import "CXLDetailsLabel.h"

const CGFloat minTile = 15;
const CGFloat maxTile = 20;

@implementation CXLDetailsLabel

+ (instancetype)labelWithModel:(CXLDetailsModel *)model{
    
    CXLDetailsLabel *lable = [[CXLDetailsLabel alloc] init];
    lable.text = model.tname;
    lable.font = [UIFont systemFontOfSize:maxTile];
    lable.textColor = [UIColor redColor];
    lable.textAlignment = NSTextAlignmentCenter;
    
    [lable sizeToFit];
    return lable;
}

- (void)setIsSelected:(BOOL)isSelected {
    
    _isSelected = isSelected;
    
    if (_isSelected == NO) {
        
        self.font = [UIFont systemFontOfSize:minTile];
        self.textColor = [UIColor blackColor];
    }else{
        
        self.font = [UIFont systemFontOfSize:maxTile];
        self.textColor = [UIColor redColor];
    }
    
    
    
    
    
}

@end
